@echo off
title 随手记
:loop
cls
echo.
echo ===== 随手记 =====
echo  1  新增
echo  2  列出全部
echo  3  查找
echo  4  删除
echo  0  退出
echo ==================
set /p choice=请选择:
if "%choice%"=="1" (
  set /p txt=请输入内容:
  py -3 note.py add "%txt%"
  pause
  goto loop
)
if "%choice%"=="2" (
  py -3 note.py list
  pause
  goto loop
)
if "%choice%"=="3" (
  set /p key=请输入关键词:
  py -3 note.py find "%key%"
  pause
  goto loop
)
if "%choice%"=="4" (
  set /p id=请输入要删除的ID:
  py -3 note.py del %id%
  pause
  goto loop
)
if "%choice%"=="0" exit
goto loop